package com.toidep.entities;

import org.json.JSONObject;

import com.toidep.api.ParseJSON;
import com.toidep.config.Constants;
import com.toidep.utilities.StringUtility;

public class ModelEntity {

	private String id;
	private String name;
	private String birthday;
	private String icon;
	private String thumb;
	private String background;
	
	private String totalView;
	private String totalVideo;
	private String totalAlbum;
	private String totalComment;
	private String totalRelation;
	
	private String display;
	
	public ModelEntity() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getThumb() {
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public String getBackground() {
		return background;
	}

	public void setBackground(String background) {
		this.background = background;
	}

	public String getTotalView() {
		return totalView;
	}

	public void setTotalView(String totalView) {
		this.totalView = totalView;
	}

	public String getTotalComment() {
		return totalComment;
	}

	public void setTotalComment(String totalComment) {
		this.totalComment = totalComment;
	}
	
	public String getTotalVideo() {
		return totalVideo;
	}

	public void setTotalVideo(String totalVideo) {
		this.totalVideo = totalVideo;
	}

	public String getTotalAlbum() {
		return totalAlbum;
	}

	public void setTotalAlbum(String totalAlbum) {
		this.totalAlbum = totalAlbum;
	}

	public String getTotalRelation() {
		return totalRelation;
	}

	public void setTotalRelation(String totalRelation) {
		this.totalRelation = totalRelation;
	}

	public String getDisplay() {
		return display;
	}

	public void setDisplay(String display) {
		this.display = display;
	}

	public void setInfo(JSONObject jsonObject) {
		
		// common
		this.id = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_ID);
		this.name = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_NAME);
		this.icon = StringUtility.parseImageUrl(ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_ICON));
		this.thumb = StringUtility.parseImageUrl(ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_THUMB));
		this.background = StringUtility.parseImageUrl(ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_BACKGROUND));
		this.totalView = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TOTAL_VIEW);
		this.totalComment = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TOTAL_COMMENT);
		this.totalVideo = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TOTAL_VIDEO);
		this.totalAlbum = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TOTAL_GALLERY);
//		this.totalRelation = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_TOTAL_VIDEO);
		this.display = ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_DISPLAY);
		this.birthday =  ParseJSON.getStringValue(jsonObject, Constants.PARAM_RESPONSE_BIRTHDAY);
	}
	
}
